
local ModelsManager={
    models={
       require("app.models.LoginCtrl"),
       require("app.models.StageCtrl"),
       require("app.models.RoleCtrl"),
       require("app.models.BagCtrl"),
       require("app.models.BuyCtrl"),
    }
}

--初始化
function ModelsManager:init()
    for i, mod in ipairs(self.models) do
        mod:init()
    end
end

--清理
function ModelsManager:clean()
    for i, mod in ipairs(self.models) do
        mod:clean()
    end
    print("clean all models")
end

--登录时，请求各模块的初始数据 请求各模块的消息
function ModelsManager:requestInit()
    print("request all init data")
    NetEngine:sendMessage(ProtoCmd.ReqInitBagMessage,{bType=1},false)
    NetEngine:sendMessage(ProtoCmd.ReqInitBagMessage,{bType=2},false)
end

return ModelsManager